﻿#pragma once
#include "XyNet/Global.h"

namespace XyNet
{
	/// 过程计时器
	class XYNET_API ProcessTimer : noncopyable
	{
	public:
		explicit ProcessTimer(const string& caption = "");

		void setCaption(const string& caption);

		void restart();

		double elapsed() const;

		void print();

	private:
		string _caption;
		chrono::steady_clock::time_point _startTime;
	};
}